/*
 * Copyright (c) 2018 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
const AbstractModel = require("../../common/abstract_model");

/**
 * DescribeTargetGroupInstanceStatus request structure.
 * @class
 */
class DescribeTargetGroupInstanceStatusRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Unique target group ID
         * @type {string || null}
         */
        this.TargetGroupId = null;

        /**
         * List of backend service IPs bound to the target group
         * @type {Array.<string> || null}
         */
        this.TargetGroupInstanceIps = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TargetGroupId = 'TargetGroupId' in params ? params.TargetGroupId : null;
        this.TargetGroupInstanceIps = 'TargetGroupInstanceIps' in params ? params.TargetGroupInstanceIps : null;

    }
}

/**
 * DescribeTargetGroupList response structure.
 * @class
 */
class DescribeTargetGroupListResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * Number of displayed results.
         * @type {number || null}
         */
        this.TotalCount = null;

        /**
         * Collection of displayed target group information.
         * @type {Array.<TargetGroupInfo> || null}
         */
        this.TargetGroupSet = null;

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;

        if (params.TargetGroupSet) {
            this.TargetGroupSet = new Array();
            for (let z in params.TargetGroupSet) {
                let obj = new TargetGroupInfo();
                obj.deserialize(params.TargetGroupSet[z]);
                this.TargetGroupSet.push(obj);
            }
        }
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * DisassociateTargetGroups response structure.
 * @class
 */
class DisassociateTargetGroupsResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * DescribeTargetGroupList request structure.
 * @class
 */
class DescribeTargetGroupListRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Target group ID array.
         * @type {Array.<string> || null}
         */
        this.TargetGroupIds = null;

        /**
         * Filter criterion array, which supports TargetGroupVpcId and TargetGroupName.
         * @type {Array.<Filter> || null}
         */
        this.Filters = null;

        /**
         * Starting display offset.
         * @type {number || null}
         */
        this.Offset = null;

        /**
         * Limit on the number of displayed entries. Default value: 20.
         * @type {number || null}
         */
        this.Limit = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TargetGroupIds = 'TargetGroupIds' in params ? params.TargetGroupIds : null;

        if (params.Filters) {
            this.Filters = new Array();
            for (let z in params.Filters) {
                let obj = new Filter();
                obj.deserialize(params.Filters[z]);
                this.Filters.push(obj);
            }
        }
        this.Offset = 'Offset' in params ? params.Offset : null;
        this.Limit = 'Limit' in params ? params.Limit : null;

    }
}

/**
 * ModifyGatewayLoadBalancerAttribute request structure.
 * @class
 */
class ModifyGatewayLoadBalancerAttributeRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Unique GWLB ID.
         * @type {string || null}
         */
        this.LoadBalancerId = null;

        /**
         * GWLB instance name. It supports input of 1 to 60 characters.
         * @type {string || null}
         */
        this.LoadBalancerName = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.LoadBalancerId = 'LoadBalancerId' in params ? params.LoadBalancerId : null;
        this.LoadBalancerName = 'LoadBalancerName' in params ? params.LoadBalancerName : null;

    }
}

/**
 * ModifyTargetGroupInstancesWeight response structure.
 * @class
 */
class ModifyTargetGroupInstancesWeightResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * DescribeTargetGroups request structure.
 * @class
 */
class DescribeTargetGroupsRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Target group ID, which is mutually exclusive with Filters.
         * @type {Array.<string> || null}
         */
        this.TargetGroupIds = null;

        /**
         * Limit on the number of displayed entries. Default value: 20.
         * @type {number || null}
         */
        this.Limit = null;

        /**
         * Starting display offset.
         * @type {number || null}
         */
        this.Offset = null;

        /**
         * Filter criterion array, which supports TargetGroupVpcId and TargetGroupName.
         * @type {Array.<Filter> || null}
         */
        this.Filters = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TargetGroupIds = 'TargetGroupIds' in params ? params.TargetGroupIds : null;
        this.Limit = 'Limit' in params ? params.Limit : null;
        this.Offset = 'Offset' in params ? params.Offset : null;

        if (params.Filters) {
            this.Filters = new Array();
            for (let z in params.Filters) {
                let obj = new Filter();
                obj.deserialize(params.Filters[z]);
                this.Filters.push(obj);
            }
        }

    }
}

/**
 * DescribeTaskStatus response structure.
 * @class
 */
class DescribeTaskStatusResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * Current status of task. Valid values: 0 (succeeded), 1 (failed), 2 (in progress).
         * @type {number || null}
         */
        this.Status = null;

        /**
         * Array of unique CLB instance IDs.

Note: This field may return null, indicating that no valid value can be obtained.
         * @type {Array.<string> || null}
         */
        this.LoadBalancerIds = null;

        /**
         * Auxiliary description information, such as failure causes.
Note: This field may return null, indicating that no valid value can be obtained.
         * @type {string || null}
         */
        this.Message = null;

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.Status = 'Status' in params ? params.Status : null;
        this.LoadBalancerIds = 'LoadBalancerIds' in params ? params.LoadBalancerIds : null;
        this.Message = 'Message' in params ? params.Message : null;
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * InquirePriceCreateGatewayLoadBalancer response structure.
 * @class
 */
class InquirePriceCreateGatewayLoadBalancerResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * This parameter represents the corresponding price.
         * @type {Price || null}
         */
        this.Price = null;

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }

        if (params.Price) {
            let obj = new Price();
            obj.deserialize(params.Price)
            this.Price = obj;
        }
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * CreateTargetGroup response structure.
 * @class
 */
class CreateTargetGroupResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * ID generated after target group creation
         * @type {string || null}
         */
        this.TargetGroupId = null;

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TargetGroupId = 'TargetGroupId' in params ? params.TargetGroupId : null;
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * Real server bound to a target group
 * @class
 */
class TargetGroupBackend extends  AbstractModel {
    constructor(){
        super();

        /**
         * Target group ID
         * @type {string || null}
         */
        this.TargetGroupId = null;

        /**
         * Backend service type. Valid values: CVM, ENI (to be supported soon)
         * @type {string || null}
         */
        this.Type = null;

        /**
         * Unique backend service ID
         * @type {string || null}
         */
        this.InstanceId = null;

        /**
         * Listening port of backend service
         * @type {number || null}
         */
        this.Port = null;

        /**
         * Forwarding weight of backend service. Value range: [0, 100]. Default value: 10.
         * @type {number || null}
         */
        this.Weight = null;

        /**
         * Public network IP of the real server

Note: This field may return null, indicating that no valid value can be obtained.
         * @type {Array.<string> || null}
         */
        this.PublicIpAddresses = null;

        /**
         * Private network IP of backend serviceNote: This field may return null, indicating that no valid value can be obtained.
         * @type {Array.<string> || null}
         */
        this.PrivateIpAddresses = null;

        /**
         * Instance name of the real server

Note: This field may return null, indicating that no valid value can be obtained.
         * @type {string || null}
         */
        this.InstanceName = null;

        /**
         * Real server binding time

Note: This field may return null, indicating that no valid value can be obtained.
         * @type {string || null}
         */
        this.RegisteredTime = null;

        /**
         * Unique ID of the ENI

Note: This field may return null, indicating that no valid value can be obtained.
         * @type {string || null}
         */
        this.EniId = null;

        /**
         * Available zone ID of backend serviceNote: This field may return null, indicating that no valid value can be obtained.
         * @type {number || null}
         */
        this.ZoneId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TargetGroupId = 'TargetGroupId' in params ? params.TargetGroupId : null;
        this.Type = 'Type' in params ? params.Type : null;
        this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
        this.Port = 'Port' in params ? params.Port : null;
        this.Weight = 'Weight' in params ? params.Weight : null;
        this.PublicIpAddresses = 'PublicIpAddresses' in params ? params.PublicIpAddresses : null;
        this.PrivateIpAddresses = 'PrivateIpAddresses' in params ? params.PrivateIpAddresses : null;
        this.InstanceName = 'InstanceName' in params ? params.InstanceName : null;
        this.RegisteredTime = 'RegisteredTime' in params ? params.RegisteredTime : null;
        this.EniId = 'EniId' in params ? params.EniId : null;
        this.ZoneId = 'ZoneId' in params ? params.ZoneId : null;

    }
}

/**
 * Details of target group health check
 * @class
 */
class TargetGroupHealthCheck extends  AbstractModel {
    constructor(){
        super();

        /**
         * Whether to enable the health check.
         * @type {boolean || null}
         */
        this.HealthSwitch = null;

        /**
         * Protocol used for health check, which supports PING and TCP and is PING by default.

- PING: icmp
- TCP: tcp
         * @type {string || null}
         */
        this.Protocol = null;

        /**
         * Health check port, which is required when the probe protocol is TCP.
         * @type {number || null}
         */
        this.Port = null;

        /**
         * Health check timeout. The default is 2 seconds. Value range: 2-30 seconds.
         * @type {number || null}
         */
        this.Timeout = null;

        /**
         * Detection interval time. The default is 5 seconds. Value range: 2-300 seconds.
         * @type {number || null}
         */
        this.IntervalTime = null;

        /**
         * Health detection threshold. The default is 3 times. Value range: 2-10 times.
         * @type {number || null}
         */
        this.HealthNum = null;

        /**
         * Unhealth detection threshold. The default is 3 times. Value range: 2-10 times.
         * @type {number || null}
         */
        this.UnHealthNum = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.HealthSwitch = 'HealthSwitch' in params ? params.HealthSwitch : null;
        this.Protocol = 'Protocol' in params ? params.Protocol : null;
        this.Port = 'Port' in params ? params.Port : null;
        this.Timeout = 'Timeout' in params ? params.Timeout : null;
        this.IntervalTime = 'IntervalTime' in params ? params.IntervalTime : null;
        this.HealthNum = 'HealthNum' in params ? params.HealthNum : null;
        this.UnHealthNum = 'UnHealthNum' in params ? params.UnHealthNum : null;

    }
}

/**
 * ModifyTargetGroupInstancesWeight request structure.
 * @class
 */
class ModifyTargetGroupInstancesWeightRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Target group ID.
         * @type {string || null}
         */
        this.TargetGroupId = null;

        /**
         * Instance binding configuration array.
         * @type {Array.<TargetGroupInstance> || null}
         */
        this.TargetGroupInstances = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TargetGroupId = 'TargetGroupId' in params ? params.TargetGroupId : null;

        if (params.TargetGroupInstances) {
            this.TargetGroupInstances = new Array();
            for (let z in params.TargetGroupInstances) {
                let obj = new TargetGroupInstance();
                obj.deserialize(params.TargetGroupInstances[z]);
                this.TargetGroupInstances.push(obj);
            }
        }

    }
}

/**
 * DeleteTargetGroups response structure.
 * @class
 */
class DeleteTargetGroupsResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * It indicates the price of the GWLB.
 * @class
 */
class Price extends  AbstractModel {
    constructor(){
        super();

        /**
         * It describes the instance price.Note: This field may return null, indicating that no valid value can be obtained.
         * @type {ItemPrice || null}
         */
        this.InstancePrice = null;

        /**
         * It describes the price of GLCU.
Note: This field may return null, indicating that no valid value can be obtained.
         * @type {ItemPrice || null}
         */
        this.LcuPrice = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }

        if (params.InstancePrice) {
            let obj = new ItemPrice();
            obj.deserialize(params.InstancePrice)
            this.InstancePrice = obj;
        }

        if (params.LcuPrice) {
            let obj = new ItemPrice();
            obj.deserialize(params.LcuPrice)
            this.LcuPrice = obj;
        }

    }
}

/**
 * ModifyGatewayLoadBalancerAttribute response structure.
 * @class
 */
class ModifyGatewayLoadBalancerAttributeResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * DeleteGatewayLoadBalancer request structure.
 * @class
 */
class DeleteGatewayLoadBalancerRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Array of GWLB instance IDs to be deleted, with the array size up to 20.
         * @type {Array.<string> || null}
         */
        this.LoadBalancerIds = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.LoadBalancerIds = 'LoadBalancerIds' in params ? params.LoadBalancerIds : null;

    }
}

/**
 * Tag information on GWLB
 * @class
 */
class TagInfo extends  AbstractModel {
    constructor(){
        super();

        /**
         * Tag key
         * @type {string || null}
         */
        this.TagKey = null;

        /**
         * Tag value
         * @type {string || null}
         */
        this.TagValue = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TagKey = 'TagKey' in params ? params.TagKey : null;
        this.TagValue = 'TagValue' in params ? params.TagValue : null;

    }
}

/**
 * AssociateTargetGroups request structure.
 * @class
 */
class AssociateTargetGroupsRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Binding relationship array. A single request supports up to 20 items.
         * @type {Array.<TargetGroupAssociation> || null}
         */
        this.Associations = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }

        if (params.Associations) {
            this.Associations = new Array();
            for (let z in params.Associations) {
                let obj = new TargetGroupAssociation();
                obj.deserialize(params.Associations[z]);
                this.Associations.push(obj);
            }
        }

    }
}

/**
 * DeregisterTargetGroupInstances request structure.
 * @class
 */
class DeregisterTargetGroupInstancesRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Target group ID.
         * @type {string || null}
         */
        this.TargetGroupId = null;

        /**
         * Information on server to be unbound.
         * @type {Array.<TargetGroupInstance> || null}
         */
        this.TargetGroupInstances = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TargetGroupId = 'TargetGroupId' in params ? params.TargetGroupId : null;

        if (params.TargetGroupInstances) {
            this.TargetGroupInstances = new Array();
            for (let z in params.TargetGroupInstances) {
                let obj = new TargetGroupInstance();
                obj.deserialize(params.TargetGroupInstances[z]);
                this.TargetGroupInstances.push(obj);
            }
        }

    }
}

/**
 * Information on the GWLB instance
 * @class
 */
class GatewayLoadBalancer extends  AbstractModel {
    constructor(){
        super();

        /**
         * GWLB instance ID.
         * @type {string || null}
         */
        this.LoadBalancerId = null;

        /**
         * Name of the GWLB instance.
         * @type {string || null}
         */
        this.LoadBalancerName = null;

        /**
         * VPC to which the GWLB belongs.Note: this field may return `null`, indicating that no valid values can be obtained.
         * @type {string || null}
         */
        this.VpcId = null;

        /**
         * Subnet to which the GWLB belongs.
         * @type {string || null}
         */
        this.SubnetId = null;

        /**
         * Virtual IP of GWLB for providing service.
         * @type {Array.<string> || null}
         */
        this.Vips = null;

        /**
         * GWLB instance status.0: creating, 1: normal operation, 3: deleting.
         * @type {number || null}
         */
        this.Status = null;

        /**
         * Unique ID of associated target group.Note: this field may return `null`, indicating that no valid values can be obtained.
         * @type {string || null}
         */
        this.TargetGroupId = null;

        /**
         * Whether to enable the deletion protection feature.Note: this field may return `null`, indicating that no valid values can be obtained.
         * @type {boolean || null}
         */
        this.DeleteProtect = null;

        /**
         * Tag information on the CLB instance.Note: this field may return `null`, indicating that no valid values can be obtained.
         * @type {Array.<TagInfo> || null}
         */
        this.Tags = null;

        /**
         * Creation time.
         * @type {string || null}
         */
        this.CreateTime = null;

        /**
         * Billing type of the GWLB instance. POSTPAID_BY_HOUR: pay-as-you-goNote: this field may return `null`, indicating that no valid values can be obtained.
         * @type {string || null}
         */
        this.ChargeType = null;

        /**
         * 0: Not isolated; 1: Isolated.

Note: this field may return `null`, indicating that no valid values can be obtained.
         * @type {number || null}
         */
        this.Isolation = null;

        /**
         * CLB instance isolation time

Note: this field may return `null`, indicating that no valid values can be obtained.
         * @type {string || null}
         */
        this.IsolatedTime = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.LoadBalancerId = 'LoadBalancerId' in params ? params.LoadBalancerId : null;
        this.LoadBalancerName = 'LoadBalancerName' in params ? params.LoadBalancerName : null;
        this.VpcId = 'VpcId' in params ? params.VpcId : null;
        this.SubnetId = 'SubnetId' in params ? params.SubnetId : null;
        this.Vips = 'Vips' in params ? params.Vips : null;
        this.Status = 'Status' in params ? params.Status : null;
        this.TargetGroupId = 'TargetGroupId' in params ? params.TargetGroupId : null;
        this.DeleteProtect = 'DeleteProtect' in params ? params.DeleteProtect : null;

        if (params.Tags) {
            this.Tags = new Array();
            for (let z in params.Tags) {
                let obj = new TagInfo();
                obj.deserialize(params.Tags[z]);
                this.Tags.push(obj);
            }
        }
        this.CreateTime = 'CreateTime' in params ? params.CreateTime : null;
        this.ChargeType = 'ChargeType' in params ? params.ChargeType : null;
        this.Isolation = 'Isolation' in params ? params.Isolation : null;
        this.IsolatedTime = 'IsolatedTime' in params ? params.IsolatedTime : null;

    }
}

/**
 * DescribeGatewayLoadBalancers request structure.
 * @class
 */
class DescribeGatewayLoadBalancersRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * GWLB instance ID. Batch filtering is supported with a maximum of 20 instance IDs.
         * @type {Array.<string> || null}
         */
        this.LoadBalancerIds = null;

        /**
         * Number of GWLB instances returned in a batch, with a default value of 20 and a maximum value of 100.
         * @type {number || null}
         */
        this.Limit = null;

        /**
         * Starting offset for returning the list of GWLB instances, with a default value of 0.
         * @type {number || null}
         */
        this.Offset = null;

        /**
         * Filter criteria for querying the CLB details list. For each request, the maximum value of Filters is 10, and the maximum value of Filter.Values is 100.Filter.Name and Filter.Values are both required. Detailed filter criteria are as follows:- name - String - required: No - (filter criteria) filter by GWLB instance name, such as "gwlb-xxxx".- VpcId - String - required: No - (filter criteria) filter by the VPC to which the GWLB instance belongs, such as "vpc-bhqk****".
         * @type {Array.<Filter> || null}
         */
        this.Filters = null;

        /**
         * Search field, for fuzzy matching of name and VIP.
         * @type {string || null}
         */
        this.SearchKey = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.LoadBalancerIds = 'LoadBalancerIds' in params ? params.LoadBalancerIds : null;
        this.Limit = 'Limit' in params ? params.Limit : null;
        this.Offset = 'Offset' in params ? params.Offset : null;

        if (params.Filters) {
            this.Filters = new Array();
            for (let z in params.Filters) {
                let obj = new Filter();
                obj.deserialize(params.Filters[z]);
                this.Filters.push(obj);
            }
        }
        this.SearchKey = 'SearchKey' in params ? params.SearchKey : null;

    }
}

/**
 * DeregisterTargetGroupInstances response structure.
 * @class
 */
class DeregisterTargetGroupInstancesResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * DescribeTargetGroupInstances response structure.
 * @class
 */
class DescribeTargetGroupInstancesResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * Number of results returned for the current query.
         * @type {number || null}
         */
        this.TotalCount = null;

        /**
         * Information on bound server.
         * @type {Array.<TargetGroupBackend> || null}
         */
        this.TargetGroupInstanceSet = null;

        /**
         * Actual statistical quantity, which is not affected by Limit, Offset, or CAM.
         * @type {number || null}
         */
        this.RealCount = null;

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;

        if (params.TargetGroupInstanceSet) {
            this.TargetGroupInstanceSet = new Array();
            for (let z in params.TargetGroupInstanceSet) {
                let obj = new TargetGroupBackend();
                obj.deserialize(params.TargetGroupInstanceSet[z]);
                this.TargetGroupInstanceSet.push(obj);
            }
        }
        this.RealCount = 'RealCount' in params ? params.RealCount : null;
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * CreateTargetGroup request structure.
 * @class
 */
class CreateTargetGroupRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Target group name, limited to 60 characters.
         * @type {string || null}
         */
        this.TargetGroupName = null;

        /**
         * VPCID attribute of target group. If this parameter is left blank, the default VPC will be used.
         * @type {string || null}
         */
        this.VpcId = null;

        /**
         * Default port of the target group, which can be used when servers are added later. Either 'Port' or 'TargetGroupInstances.N.port' must be filled in.
         * @type {number || null}
         */
        this.Port = null;

        /**
         * Real server bound to a target group
         * @type {Array.<TargetGroupInstance> || null}
         */
        this.TargetGroupInstances = null;

        /**
         * GWLB target group protocol.
- TENCENT_GENEVE: GENEVE standard protocol

- AWS_GENEVE: GENEVE compatibility protocol (a ticket is required for allowlisting)
         * @type {string || null}
         */
        this.Protocol = null;

        /**
         * Health check settings.
         * @type {TargetGroupHealthCheck || null}
         */
        this.HealthCheck = null;

        /**
         * Load balancing algorithm.
- IP_HASH_3_ELASTIC: elastic hashing
         * @type {string || null}
         */
        this.ScheduleAlgorithm = null;

        /**
         * Whether "All Dead, All Alive" is supported. It is supported by default.
         * @type {boolean || null}
         */
        this.AllDeadToAlive = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TargetGroupName = 'TargetGroupName' in params ? params.TargetGroupName : null;
        this.VpcId = 'VpcId' in params ? params.VpcId : null;
        this.Port = 'Port' in params ? params.Port : null;

        if (params.TargetGroupInstances) {
            this.TargetGroupInstances = new Array();
            for (let z in params.TargetGroupInstances) {
                let obj = new TargetGroupInstance();
                obj.deserialize(params.TargetGroupInstances[z]);
                this.TargetGroupInstances.push(obj);
            }
        }
        this.Protocol = 'Protocol' in params ? params.Protocol : null;

        if (params.HealthCheck) {
            let obj = new TargetGroupHealthCheck();
            obj.deserialize(params.HealthCheck)
            this.HealthCheck = obj;
        }
        this.ScheduleAlgorithm = 'ScheduleAlgorithm' in params ? params.ScheduleAlgorithm : null;
        this.AllDeadToAlive = 'AllDeadToAlive' in params ? params.AllDeadToAlive : null;

    }
}

/**
 * CreateGatewayLoadBalancer request structure.
 * @class
 */
class CreateGatewayLoadBalancerRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * ID of the VPC to which the backend target device of the GWLB belongs, such as vpc-12345678. It can be obtained through the DescribeVpcEx interface. If left blank, it defaults to DefaultVPC. This parameter is required when a private network CLB instance is created.
         * @type {string || null}
         */
        this.VpcId = null;

        /**
         * Subnet ID of the VPC to which the backend target device of the GWLB belongs.
         * @type {string || null}
         */
        this.SubnetId = null;

        /**
         * GWLB instance name. It supports input of 1 to 60 characters. If not filled in, it will be generated automatically by default.
         * @type {string || null}
         */
        this.LoadBalancerName = null;

        /**
         * Number of GWLBs to create, with a default of 1. The maximum batch creation quantity is 10.
         * @type {number || null}
         */
        this.Number = null;

        /**
         * While the GWLB is purchased, it is tagged, with a maximum of 20 tag key-value pairs.
         * @type {Array.<TagInfo> || null}
         */
        this.Tags = null;

        /**
         * GWLB instance billing type, which currently supports POSTPAID_BY_HOUR only. The default is POSTPAID_BY_HOUR.
         * @type {string || null}
         */
        this.LBChargeType = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.VpcId = 'VpcId' in params ? params.VpcId : null;
        this.SubnetId = 'SubnetId' in params ? params.SubnetId : null;
        this.LoadBalancerName = 'LoadBalancerName' in params ? params.LoadBalancerName : null;
        this.Number = 'Number' in params ? params.Number : null;

        if (params.Tags) {
            this.Tags = new Array();
            for (let z in params.Tags) {
                let obj = new TagInfo();
                obj.deserialize(params.Tags[z]);
                this.Tags.push(obj);
            }
        }
        this.LBChargeType = 'LBChargeType' in params ? params.LBChargeType : null;

    }
}

/**
 * AssociateTargetGroups response structure.
 * @class
 */
class AssociateTargetGroupsResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * InquirePriceCreateGatewayLoadBalancer request structure.
 * @class
 */
class InquirePriceCreateGatewayLoadBalancerRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Number of GWLB instances for inquiry, with a default of 1
         * @type {number || null}
         */
        this.GoodsNum = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.GoodsNum = 'GoodsNum' in params ? params.GoodsNum : null;

    }
}

/**
 * DisassociateTargetGroups request structure.
 * @class
 */
class DisassociateTargetGroupsRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * List of target groups to unbind.
         * @type {Array.<TargetGroupAssociation> || null}
         */
        this.Associations = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }

        if (params.Associations) {
            this.Associations = new Array();
            for (let z in params.Associations) {
                let obj = new TargetGroupAssociation();
                obj.deserialize(params.Associations[z]);
                this.Associations.push(obj);
            }
        }

    }
}

/**
 * Filter criteria
 * @class
 */
class Filter extends  AbstractModel {
    constructor(){
        super();

        /**
         * Filter name
         * @type {string || null}
         */
        this.Name = null;

        /**
         * Filter value array
         * @type {Array.<string> || null}
         */
        this.Values = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.Name = 'Name' in params ? params.Name : null;
        this.Values = 'Values' in params ? params.Values : null;

    }
}

/**
 * It is used for the health check status of the target group backend RS.
 * @class
 */
class TargetGroupInstanceStatus extends  AbstractModel {
    constructor(){
        super();

        /**
         * IP of backend RS
         * @type {string || null}
         */
        this.InstanceIp = null;

        /**
         * Health check status, with parameter values and meanings as follows:● on: indicates being under detection.● off: indicates that the health check is disabled.● health: indicates being healthy.● unhealth: indicates being abnormal.
         * @type {string || null}
         */
        this.Status = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.InstanceIp = 'InstanceIp' in params ? params.InstanceIp : null;
        this.Status = 'Status' in params ? params.Status : null;

    }
}

/**
 * DescribeTargetGroupInstanceStatus response structure.
 * @class
 */
class DescribeTargetGroupInstanceStatusResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * Health check backend RS status list
         * @type {Array.<TargetGroupInstanceStatus> || null}
         */
        this.TargetGroupInstanceSet = null;

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }

        if (params.TargetGroupInstanceSet) {
            this.TargetGroupInstanceSet = new Array();
            for (let z in params.TargetGroupInstanceSet) {
                let obj = new TargetGroupInstanceStatus();
                obj.deserialize(params.TargetGroupInstanceSet[z]);
                this.TargetGroupInstanceSet.push(obj);
            }
        }
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * DescribeTargetGroupInstances request structure.
 * @class
 */
class DescribeTargetGroupInstancesRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Filter criteria. Currently, only filtering by TargetGroupId, BindIP, or InstanceId is supported.
         * @type {Array.<Filter> || null}
         */
        this.Filters = null;

        /**
         * Number of displayed results. Default value: 20.
         * @type {number || null}
         */
        this.Limit = null;

        /**
         * Displayed offset. Default value: 0.
         * @type {number || null}
         */
        this.Offset = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }

        if (params.Filters) {
            this.Filters = new Array();
            for (let z in params.Filters) {
                let obj = new Filter();
                obj.deserialize(params.Filters[z]);
                this.Filters.push(obj);
            }
        }
        this.Limit = 'Limit' in params ? params.Limit : null;
        this.Offset = 'Offset' in params ? params.Offset : null;

    }
}

/**
 * DescribeTaskStatus request structure.
 * @class
 */
class DescribeTaskStatusRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Request ID, which is the RequestId parameter returned by the API.
         * @type {string || null}
         */
        this.TaskId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TaskId = 'TaskId' in params ? params.TaskId : null;

    }
}

/**
 * RegisterTargetGroupInstances response structure.
 * @class
 */
class RegisterTargetGroupInstancesResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * CreateGatewayLoadBalancer response structure.
 * @class
 */
class CreateGatewayLoadBalancerResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * Array of unique GWLB instance IDs.In certain scenarios, for example, when there is a delay in creation, this field may return null; at this time, you can query the created resource ID through the DescribeTaskStatus API using the RequestId or DealName parameter returned by the API.Note: this field may return `null`, indicating that no valid values can be obtained.
         * @type {Array.<string> || null}
         */
        this.LoadBalancerIds = null;

        /**
         * Order number.

Note: this field may return `null`, indicating that no valid values can be obtained.
         * @type {string || null}
         */
        this.DealName = null;

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.LoadBalancerIds = 'LoadBalancerIds' in params ? params.LoadBalancerIds : null;
        this.DealName = 'DealName' in params ? params.DealName : null;
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * DescribeTargetGroups response structure.
 * @class
 */
class DescribeTargetGroupsResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * Number of displayed results.
         * @type {number || null}
         */
        this.TotalCount = null;

        /**
         * Collection of displayed target group information.
         * @type {Array.<TargetGroupInfo> || null}
         */
        this.TargetGroupSet = null;

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;

        if (params.TargetGroupSet) {
            this.TargetGroupSet = new Array();
            for (let z in params.TargetGroupSet) {
                let obj = new TargetGroupInfo();
                obj.deserialize(params.TargetGroupSet[z]);
                this.TargetGroupSet.push(obj);
            }
        }
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * RegisterTargetGroupInstances request structure.
 * @class
 */
class RegisterTargetGroupInstancesRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Target group ID
         * @type {string || null}
         */
        this.TargetGroupId = null;

        /**
         * Server instance array
         * @type {Array.<TargetGroupInstance> || null}
         */
        this.TargetGroupInstances = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TargetGroupId = 'TargetGroupId' in params ? params.TargetGroupId : null;

        if (params.TargetGroupInstances) {
            this.TargetGroupInstances = new Array();
            for (let z in params.TargetGroupInstances) {
                let obj = new TargetGroupInstance();
                obj.deserialize(params.TargetGroupInstances[z]);
                this.TargetGroupInstances.push(obj);
            }
        }

    }
}

/**
 * DeleteTargetGroups request structure.
 * @class
 */
class DeleteTargetGroupsRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Target group ID list.
         * @type {Array.<string> || null}
         */
        this.TargetGroupIds = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TargetGroupIds = 'TargetGroupIds' in params ? params.TargetGroupIds : null;

    }
}

/**
 * It describes the price information of a single item.
 * @class
 */
class ItemPrice extends  AbstractModel {
    constructor(){
        super();

        /**
         * Postpaid unit price. Unit: CNY.

Note: This field may return null, indicating that no valid value can be obtained.
         * @type {number || null}
         */
        this.UnitPrice = null;

        /**
         * Pay-as-you-go billing unit. Valid values: HOUR: indicates that the billing unit is calculated by hour. Current scenarios involving this billing unit include: postpaid by hour for instances (POSTPAID_BY_HOUR).Note: This field may return null, indicating that no valid value can be obtained.
         * @type {string || null}
         */
        this.ChargeUnit = null;

        /**
         * Original price of pre-payment (in CNY).

Note: This field may return null, indicating that no valid value can be obtained.
         * @type {number || null}
         */
        this.OriginalPrice = null;

        /**
         * Discount price of prepaid costs, unit: CNY.

Note: This field may return null, indicating that no valid value can be obtained.
         * @type {number || null}
         */
        this.DiscountPrice = null;

        /**
         * Discounted unit price for pay-as-you-go. Unit: CNY.Note: This field may return null, indicating that no valid value can be obtained.
         * @type {number || null}
         */
        this.UnitPriceDiscount = null;

        /**
         * Discount, such as 20.0 representing 80% off.

Note: This field may return null, indicating that no valid value can be obtained.
         * @type {number || null}
         */
        this.Discount = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.UnitPrice = 'UnitPrice' in params ? params.UnitPrice : null;
        this.ChargeUnit = 'ChargeUnit' in params ? params.ChargeUnit : null;
        this.OriginalPrice = 'OriginalPrice' in params ? params.OriginalPrice : null;
        this.DiscountPrice = 'DiscountPrice' in params ? params.DiscountPrice : null;
        this.UnitPriceDiscount = 'UnitPriceDiscount' in params ? params.UnitPriceDiscount : null;
        this.Discount = 'Discount' in params ? params.Discount : null;

    }
}

/**
 * Association relationship between rules and target groups.
 * @class
 */
class TargetGroupAssociation extends  AbstractModel {
    constructor(){
        super();

        /**
         * GWLB instance ID.
         * @type {string || null}
         */
        this.LoadBalancerId = null;

        /**
         * Target group ID.
         * @type {string || null}
         */
        this.TargetGroupId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.LoadBalancerId = 'LoadBalancerId' in params ? params.LoadBalancerId : null;
        this.TargetGroupId = 'TargetGroupId' in params ? params.TargetGroupId : null;

    }
}

/**
 * Target group instance
 * @class
 */
class TargetGroupInstance extends  AbstractModel {
    constructor(){
        super();

        /**
         * Private network IP of target group instance.
         * @type {string || null}
         */
        this.BindIP = null;

        /**
         * Port of target group instance. Only 6081 is supported.
         * @type {number || null}
         */
        this.Port = null;

        /**
         * Weight of target group instance. Only 0 or 16 is supported, and non-0 is uniformly treated as 16.
         * @type {number || null}
         */
        this.Weight = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.BindIP = 'BindIP' in params ? params.BindIP : null;
        this.Port = 'Port' in params ? params.Port : null;
        this.Weight = 'Weight' in params ? params.Weight : null;

    }
}

/**
 * ModifyTargetGroupAttribute response structure.
 * @class
 */
class ModifyTargetGroupAttributeResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * Rule associated with target group
 * @class
 */
class AssociationItem extends  AbstractModel {
    constructor(){
        super();

        /**
         * Associated GWLB instance ID
         * @type {string || null}
         */
        this.LoadBalancerId = null;

        /**
         * GWLB instance name
         * @type {string || null}
         */
        this.LoadBalancerName = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.LoadBalancerId = 'LoadBalancerId' in params ? params.LoadBalancerId : null;
        this.LoadBalancerName = 'LoadBalancerName' in params ? params.LoadBalancerName : null;

    }
}

/**
 * ModifyTargetGroupAttribute request structure.
 * @class
 */
class ModifyTargetGroupAttributeRequest extends  AbstractModel {
    constructor(){
        super();

        /**
         * Target group ID.
         * @type {string || null}
         */
        this.TargetGroupId = null;

        /**
         * New name of target group.
         * @type {string || null}
         */
        this.TargetGroupName = null;

        /**
         * Health check details.
         * @type {TargetGroupHealthCheck || null}
         */
        this.HealthCheck = null;

        /**
         * Whether "All Dead, All Alive" is supported.
         * @type {boolean || null}
         */
        this.AllDeadToAlive = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TargetGroupId = 'TargetGroupId' in params ? params.TargetGroupId : null;
        this.TargetGroupName = 'TargetGroupName' in params ? params.TargetGroupName : null;

        if (params.HealthCheck) {
            let obj = new TargetGroupHealthCheck();
            obj.deserialize(params.HealthCheck)
            this.HealthCheck = obj;
        }
        this.AllDeadToAlive = 'AllDeadToAlive' in params ? params.AllDeadToAlive : null;

    }
}

/**
 * Target group information
 * @class
 */
class TargetGroupInfo extends  AbstractModel {
    constructor(){
        super();

        /**
         * Target group ID
         * @type {string || null}
         */
        this.TargetGroupId = null;

        /**
         * VPCID of target group
         * @type {string || null}
         */
        this.VpcId = null;

        /**
         * Target group name
         * @type {string || null}
         */
        this.TargetGroupName = null;

        /**
         * Default port of a target group

Note: This field may return null, indicating that no valid value can be obtained.
         * @type {number || null}
         */
        this.Port = null;

        /**
         * Target group creation time
         * @type {string || null}
         */
        this.CreatedTime = null;

        /**
         * Target group modification time
         * @type {string || null}
         */
        this.UpdatedTime = null;

        /**
         * Associated rule array. This parameter cannot be obtained when the DescribeTargetGroupList API is called.Note: This field may return null, indicating that no valid value can be obtained.
         * @type {Array.<AssociationItem> || null}
         */
        this.AssociatedRule = null;

        /**
         * Backend protocol type.Note: This field may return null, indicating that no valid value can be obtained.
         * @type {string || null}
         */
        this.Protocol = null;

        /**
         * Scheduling algorithm.
ip_hash_3: elastic hashing
Note: This field may return null, indicating that no valid value can be obtained.
         * @type {string || null}
         */
        this.ScheduleAlgorithm = null;

        /**
         * Health check details.Note: This field may return null, indicating that no valid value can be obtained.
         * @type {TargetGroupHealthCheck || null}
         */
        this.HealthCheck = null;

        /**
         * Whether "All Dead, All Alive" is supported.Note: This field may return null, indicating that no valid value can be obtained.
         * @type {boolean || null}
         */
        this.AllDeadToAlive = null;

        /**
         * Number of rules associated with the target group.Note: This field may return null, indicating that no valid value can be obtained.
         * @type {number || null}
         */
        this.AssociatedRuleCount = null;

        /**
         * Number of instances in the target group.Note: This field may return null, indicating that no valid value can be obtained.
         * @type {number || null}
         */
        this.RegisteredInstancesCount = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TargetGroupId = 'TargetGroupId' in params ? params.TargetGroupId : null;
        this.VpcId = 'VpcId' in params ? params.VpcId : null;
        this.TargetGroupName = 'TargetGroupName' in params ? params.TargetGroupName : null;
        this.Port = 'Port' in params ? params.Port : null;
        this.CreatedTime = 'CreatedTime' in params ? params.CreatedTime : null;
        this.UpdatedTime = 'UpdatedTime' in params ? params.UpdatedTime : null;

        if (params.AssociatedRule) {
            this.AssociatedRule = new Array();
            for (let z in params.AssociatedRule) {
                let obj = new AssociationItem();
                obj.deserialize(params.AssociatedRule[z]);
                this.AssociatedRule.push(obj);
            }
        }
        this.Protocol = 'Protocol' in params ? params.Protocol : null;
        this.ScheduleAlgorithm = 'ScheduleAlgorithm' in params ? params.ScheduleAlgorithm : null;

        if (params.HealthCheck) {
            let obj = new TargetGroupHealthCheck();
            obj.deserialize(params.HealthCheck)
            this.HealthCheck = obj;
        }
        this.AllDeadToAlive = 'AllDeadToAlive' in params ? params.AllDeadToAlive : null;
        this.AssociatedRuleCount = 'AssociatedRuleCount' in params ? params.AssociatedRuleCount : null;
        this.RegisteredInstancesCount = 'RegisteredInstancesCount' in params ? params.RegisteredInstancesCount : null;

    }
}

/**
 * DescribeGatewayLoadBalancers response structure.
 * @class
 */
class DescribeGatewayLoadBalancersResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * Total number of CLB instances that meet the filter criteria. This value is independent of the Limit in the input parameters.
         * @type {number || null}
         */
        this.TotalCount = null;

        /**
         * Returned GWLB instance array.
         * @type {Array.<GatewayLoadBalancer> || null}
         */
        this.LoadBalancerSet = null;

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;

        if (params.LoadBalancerSet) {
            this.LoadBalancerSet = new Array();
            for (let z in params.LoadBalancerSet) {
                let obj = new GatewayLoadBalancer();
                obj.deserialize(params.LoadBalancerSet[z]);
                this.LoadBalancerSet.push(obj);
            }
        }
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

/**
 * DeleteGatewayLoadBalancer response structure.
 * @class
 */
class DeleteGatewayLoadBalancerResponse extends  AbstractModel {
    constructor(){
        super();

        /**
         * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
         * @type {string || null}
         */
        this.RequestId = null;

    }

    /**
     * @private
     */
    deserialize(params) {
        if (!params) {
            return;
        }
        this.RequestId = 'RequestId' in params ? params.RequestId : null;

    }
}

module.exports = {
    DescribeTargetGroupInstanceStatusRequest: DescribeTargetGroupInstanceStatusRequest,
    DescribeTargetGroupListResponse: DescribeTargetGroupListResponse,
    DisassociateTargetGroupsResponse: DisassociateTargetGroupsResponse,
    DescribeTargetGroupListRequest: DescribeTargetGroupListRequest,
    ModifyGatewayLoadBalancerAttributeRequest: ModifyGatewayLoadBalancerAttributeRequest,
    ModifyTargetGroupInstancesWeightResponse: ModifyTargetGroupInstancesWeightResponse,
    DescribeTargetGroupsRequest: DescribeTargetGroupsRequest,
    DescribeTaskStatusResponse: DescribeTaskStatusResponse,
    InquirePriceCreateGatewayLoadBalancerResponse: InquirePriceCreateGatewayLoadBalancerResponse,
    CreateTargetGroupResponse: CreateTargetGroupResponse,
    TargetGroupBackend: TargetGroupBackend,
    TargetGroupHealthCheck: TargetGroupHealthCheck,
    ModifyTargetGroupInstancesWeightRequest: ModifyTargetGroupInstancesWeightRequest,
    DeleteTargetGroupsResponse: DeleteTargetGroupsResponse,
    Price: Price,
    ModifyGatewayLoadBalancerAttributeResponse: ModifyGatewayLoadBalancerAttributeResponse,
    DeleteGatewayLoadBalancerRequest: DeleteGatewayLoadBalancerRequest,
    TagInfo: TagInfo,
    AssociateTargetGroupsRequest: AssociateTargetGroupsRequest,
    DeregisterTargetGroupInstancesRequest: DeregisterTargetGroupInstancesRequest,
    GatewayLoadBalancer: GatewayLoadBalancer,
    DescribeGatewayLoadBalancersRequest: DescribeGatewayLoadBalancersRequest,
    DeregisterTargetGroupInstancesResponse: DeregisterTargetGroupInstancesResponse,
    DescribeTargetGroupInstancesResponse: DescribeTargetGroupInstancesResponse,
    CreateTargetGroupRequest: CreateTargetGroupRequest,
    CreateGatewayLoadBalancerRequest: CreateGatewayLoadBalancerRequest,
    AssociateTargetGroupsResponse: AssociateTargetGroupsResponse,
    InquirePriceCreateGatewayLoadBalancerRequest: InquirePriceCreateGatewayLoadBalancerRequest,
    DisassociateTargetGroupsRequest: DisassociateTargetGroupsRequest,
    Filter: Filter,
    TargetGroupInstanceStatus: TargetGroupInstanceStatus,
    DescribeTargetGroupInstanceStatusResponse: DescribeTargetGroupInstanceStatusResponse,
    DescribeTargetGroupInstancesRequest: DescribeTargetGroupInstancesRequest,
    DescribeTaskStatusRequest: DescribeTaskStatusRequest,
    RegisterTargetGroupInstancesResponse: RegisterTargetGroupInstancesResponse,
    CreateGatewayLoadBalancerResponse: CreateGatewayLoadBalancerResponse,
    DescribeTargetGroupsResponse: DescribeTargetGroupsResponse,
    RegisterTargetGroupInstancesRequest: RegisterTargetGroupInstancesRequest,
    DeleteTargetGroupsRequest: DeleteTargetGroupsRequest,
    ItemPrice: ItemPrice,
    TargetGroupAssociation: TargetGroupAssociation,
    TargetGroupInstance: TargetGroupInstance,
    ModifyTargetGroupAttributeResponse: ModifyTargetGroupAttributeResponse,
    AssociationItem: AssociationItem,
    ModifyTargetGroupAttributeRequest: ModifyTargetGroupAttributeRequest,
    TargetGroupInfo: TargetGroupInfo,
    DescribeGatewayLoadBalancersResponse: DescribeGatewayLoadBalancersResponse,
    DeleteGatewayLoadBalancerResponse: DeleteGatewayLoadBalancerResponse,

}
